<?php 
/**
 * Oreo授权系统
 * =======================================================
 * Q Q: 26341012
 * QQ群: 144677741
 * 官网:https://www.yfxw.cn
 * =======================================================
 */
include '../oreo/oreo.core.php';
require 'oreo.config.php';
$concent = $_POST['searchContent'];
$searchMod = $_POST['searchMod'];
$conn = new mysqli($oreoconfig['host'],$oreoconfig['user'], $oreoconfig['pwd'], $oreoconfig['dbname']);
$url= "../chaxun.php";
if ($searchMod==0) {
    $sql = $conn->query("select * from oreo_authorize where domain='$concent'");
    $row = mysqli_fetch_assoc($sql); 
    if($row>0){
          echo <<< html
          <script src="../assets/index/js/jquery.min.js"></script><script src="../assets/layer/layer.js"></script>
          <script> layer.alert('该域名为正版授权',{icon: 6});</script>
           
          html;
   
    }else {
          echo <<< html
        
          <script src="../assets/index/js/jquery.min.js"></script><script src="../assets/layer/layer.js"></script>
          <script> layer.alert('该域名非正版授权',{icon: 5});</script>
           
          html;
    }
} elseif ($searchMod==1) {
    $sql = $conn->query("select * from oreo_authorize where qq='$concent'");
    $row = mysqli_fetch_assoc($sql); 
    if($row>0){
         echo <<< html
        
          <script src="../assets/index/js/jquery.min.js"></script><script src="../assets/layer/layer.js"></script>
          <script> layer.alert('该站长使用程序为正版授权',{icon: 6});</script>
           
          html;
    }else {
         echo <<< html
        
          <script src="../assets/index/js/jquery.min.js"></script><script src="../assets/layer/layer.js"></script>
          <script> layer.alert('该站长使用程序为盗版程序',{icon: 5});</script>
           
          html;

    }
}elseif ($searchMod==2) {
    $sql = $conn->query("select * from oreo_user where qq='$concent'and grade_name='普通授权商'");
    $row = mysqli_fetch_assoc($sql); 
    if($row>0){
                echo <<< html
        
          <script src="../assets/index/js/jquery.min.js"></script><script src="../assets/layer/layer.js"></script>
          <script> layer.alert('该用户为普通授权商',{icon: 6});</script>
           
          html;
         
    }else {
        echo <<< html
        
          <script src="../assets/index/js/jquery.min.js"></script><script src="../assets/layer/layer.js"></script>
          <script> layer.alert('该用户非普通授权商',{icon: 5});</script>
           
          html;
    }
    
}elseif ($searchMod==3) {
    $sql = $conn->query("select * from oreo_user where qq='$concent'and grade_name='平台副管理'");
    $row = mysqli_fetch_assoc($sql); 
    if($row>0){
              echo <<< html
        
          <script src="../assets/index/js/jquery.min.js"></script><script src="../assets/layer/layer.js"></script>
          <script> layer.alert('该用户为平台副管理',{icon: 6});</script>
           
          html;
    }else {
            echo <<< html
        
          <script src="../assets/index/js/jquery.min.js"></script><script src="../assets/layer/layer.js"></script>
          <script> layer.alert('该用户非平台副管理',{icon: 5});</script>
           
          html;
    }
    
}elseif ($searchMod==4) {
    $sql = $conn->query("select * from oreo_user where qq='$concent'and grade_name='合作伙伴'");
    $row = mysqli_fetch_assoc($sql); 
    if($row>0){
            echo <<< html
        
          <script src="../assets/index/js/jquery.min.js"></script><script src="../assets/layer/layer.js"></script>
          <script> layer.alert('该用户为合作伙伴',{icon: 6});</script>
           
          html;
    }else {
       echo <<< html
        
          <script src="../assets/index/js/jquery.min.js"></script><script src="../assets/layer/layer.js"></script>
          <script> layer.alert('该用户非合作伙伴',{icon: 5});</script>
           
          html;
    }

}
?>
<html>
    <title>正版查询|<?php echo $conf['web_title'];?></title>
    
    <script>setTimeout("javascript:location.href='../chaxun.php'", 2500); </script>
</html>